package com.lw.sbdemo2.service;

import com.github.pagehelper.PageHelper;
import com.lw.sbdemo2.common.base.CrudService;
import com.lw.sbdemo2.common.vo.PageInfo;
import com.lw.sbdemo2.entity.TkTermProduct;
import com.lw.sbdemo2.mapper.TkTermProductMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>标题: 试卷商品主表服务 - 业务逻辑层</p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2019</p>
 * <p>公司: 山人行工作室</p>
 *
 * @version: 1.0
 * @author: LinWang
 * @date 2019-5-20
 */
@Slf4j
@Service
public class TkTermProductService extends CrudService<TkTermProduct, TkTermProductMapper> {

	/**
     * 获取用户分页列表
     *
     * @param query    搜索关键词
     * @param pageInfo 分页实体
	 * @param tkTermProduct 实体入参
     * @return 用户列表
     */
    public PageInfo<TkTermProduct> findListPage(String query, PageInfo pageInfo, TkTermProduct tkTermProduct) {
        PageHelper.startPage(pageInfo);
        List<TkTermProduct> tkTermProductlist = this.dao.findListPage(query, tkTermProduct);
        return new PageInfo<>(tkTermProductlist);
    }
}